package com.itheima.service.impl;
import com.github.pagehelper.PageHelper;
import com.itheima.mapper.UserMapper;
import com.itheima.pojo.UserInfo;
import com.itheima.service.UserInfoService;
import lombok.Data;

import java.util.List;

public class UserInfoServiceImpl implements UserInfoService {

    private UserMapper userMapper;

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public UserInfo findOne(Integer id) {
        return userMapper.findById(id);
    }

    @Override
    public List<UserInfo> findAll() {
        PageHelper.startPage(1,2);
        return userMapper.findAll();
    }
}
